﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace School.Admin
{
    public partial class top : CheckPower
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Label1.Text = LoginUserName;
                lb2.Text = DateTime.Now.ToString();
            }
        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Session.Clear();
            Session.Remove("WebSessions");
            Session.Remove("UserName");
            Session["WebSessions"] = Session["UserName"] = null;
            Session.RemoveAll(); //用于结果了所有的键值
            Session.Abandon(); //用于结果了当前会话
            LoginUserId = 0;
            Response.Write("<script>parents.location.href='login.aspx'</script>");
        }
    }
}